﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Pages_WebControls_LogInControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Logoutbutton_Click(object sender, EventArgs e)
    {
        FormsAuthentication.SignOut();
        Response.RedirectToRoute("Home");
    }

    protected void LoginButton_Click(object sender, EventArgs e)
    {
        string url = HttpUtility.UrlPathEncode(Request.Path.Substring(7));
        Response.RedirectToRoute("Login", new { ReturnUrl = url });

    }
}